-
Notifications
You must be signed in to change notification settings - Fork 687
Feat/background goroutine get job info test #4368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Feat/background goroutine get job info test #4368
Conversation
… for cache Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
| // Test with getting a persistent error, the cache should be removed eventually. | ||
| nonExistedJobId := "not-existed-job-id" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another test in the same bubble. The goroutine is created by singleton and synctest is not allowed to access goroutine outside of bubble.
| WithRayClusterSpec(NewRayClusterSpec(MountConfigMap[rayv1ac.RayClusterSpecApplyConfiguration](jobs, "/home/ray/jobs"))). | ||
| WithEntrypoint("python /home/ray/jobs/long_running.py"). | ||
| WithActiveDeadlineSeconds(45). // Short deadline for failing the JobDeploymentStatus, but making sure the cluster is running | ||
| WithActiveDeadlineSeconds(60). // Short deadline for failing the JobDeploymentStatus, but making sure the cluster is running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a few second to avoid flaky.
| g.Eventually(RayJob(test, rayJob.Namespace, rayJob.Name), TestTimeoutMedium). | ||
| Should(And( | ||
| WithTransform(RayJobStatus, Equal(rayv1.JobStatusRunning)), | ||
| WithTransform(RayJobReason, Equal(rayv1.DeadlineExceeded)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Eventually to wait for the condition satisfied.
…oroutine-get-job-info-test
ray-operator/controllers/ray/utils/dashboardclient/dashboard_cache_client_test.go
Show resolved
Hide resolved
Signed-off-by: fscnick <[email protected]>
f8c8afb to
5ea0272
Compare
|
cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no bugs!
Future-Outlier
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
cc @AndySung320 to take a look |
Future-Outlier
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we only keep testing AsyncJobInfoQuery=false?
since this is not yet in beta version or GA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, cc @rueian to merge
but I personally think we should keep testing AsyncJobInfoQuery=false
…oroutine-get-job-info-test
5ea0272 to
18d6c84
Compare
I'm not that certain about it, kindly let me know if I was wrong. Isn't kuberay/.buildkite/build-start-operator.sh Lines 15 to 20 in a9a4ab0
|
Can we test both |
…oQuery Signed-off-by: fscnick <[email protected]>
.buildkite/test-e2e.yml
Outdated
| # Build nightly KubeRay operator image | ||
| - pushd ray-operator | ||
| - IMG=kuberay/operator:nightly make docker-image && kind load docker-image kuberay/operator:nightly && echo "Deploying operator with test overrides without AsyncJobInfoQuery (feature gates via test-overrides-without-async-job-info-query overlay )" | ||
| - IMG=kuberay/operator:nightly make deploy-with-override-without-async-job-info-query |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an additional e2e test with a different make command to test them with AsyncJobInfoQuery=true
ray-operator/config/overlays/test-overrides-with-async-job-info-query/deployment-override.yaml
Show resolved
Hide resolved
Signed-off-by: fscnick <[email protected]>
…oroutine-get-job-info-test
Why are these changes needed?
This PR provides the unit test and e2e test for #4160.
Related issue number
Checks